<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="core" %>
<%@ taglib prefix="fmt" uri="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="<%=path%>/page/back/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- fonts -->

		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->

		<script src="<%=path%>/page/back/assets/js/ace-extra.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="<%=path%>/page/back/assets/js/html5shiv.js"></script>
		<script src="<%=path%>/page/back/assets/js/respond.min.js"></script>
		<![endif]-->
		
		<style type="text/css">
			#aaaa{
				width:400px;
				height:100px;
				margin:20px auto;
				text-align:center;
			}
		</style>
	</head>

	<body style="background:#fff;">
		<div class="col-xs-12">
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS --><br/>
					<div class="row">
						<div class="col-sm-12">
							<div class="widget-box">
								<div class="widget-header widget-header-flat">
									<h4 class="smaller">
										<i class="icon-quote-left smaller-80"></i>
										主题区
									</h4>
								</div>

								<div class="widget-body">
									<div class="widget-main">
										
										<c:forEach items="${json.discuss}" var="all">
											<div class="row">
												<div class="col-xs-12">
													<blockquote>
														<p>${all.dsContent}</p>
														<small>
															<cite title="Source Title">Source Title</cite>&nbsp;&nbsp;
															${all.users.uName}
														</small>
														<small>
															<fmt:formatDate value="${all.dsTime}" pattern="yyyy-MM-dd HH:mm:ss" />
														</small>
													</blockquote>
												</div>
											</div>
										</c:forEach><br/><br/>
										<div id="aaaa">
											<ul class="nav navbar-nav">
							                	<c:if test="${pageNum > 1}">
							                	<li><a href="${drId}.html?a=1">首页</a></li>
							                	</c:if>
							                	<c:if test="${pageNum>1}">
							                		<li><a href="${drId}.html?p=${pageNum-1}&a=1">上一页</a></li>
							                	</c:if>
							                	<c:if test="${pageNum<pageCount}">
							                		<li><a href="${drId}.html?p=${pageNum+1}&a=1">下一页</a></li>
							                	</c:if>
							                	<c:if test="${pageNum < pageCount}">
							                	<li><a href="${drId}.html?p=${pageCount}&a=1">尾页</a></li>
							                	</c:if>
							                </ul>
										</div>
										<div id="fengye">
											<ul id="fengul">
							                	<c:if test="${pageNum > 1}">
							                	<li>
						                		<form action="${drId}.html" method="post">
								                		<input type="hidden" name="a" value="1"/>
									                	<input type="hidden" name="key" value="${key}"/>
								                		<a href="#" type="submit">首页</a>
							                		</form>
							                	</li>
							                	</c:if>
							                	<c:if test="${pageNum>1}">
							                		<li>
								                		<form action="${drId}.html" method="post">
								                			<input type="hidden" name="a" value="1"/>
									                		<input type="hidden" name="p" value="${pageNum-1}"/>
									                		<input type="hidden" name="key" value="${key}"/>
									                		<a href="#" type="submit">上一页</a>
								                		</form>
							                		</li>
							                	</c:if>
							                	<c:if test="${pageNum<pageCount}">
							                		<li>
								                		<form action="${drId}.html" method="post">
									                		<input type="hidden" name="p" value="${pageNum+1}"/>
								                			<input type="hidden" name="a" value="1"/>
									                		<input type="hidden" name="key" value="${key}"/>
									                		<a href="#" type="submit">下一页</a>
								                		</form>
							                		</li>
							                	</c:if>
							                	<c:if test="${pageNum < pageCount}">
							                	<li>
							                		<form action="${drId}.html" method="post">
								                		<input type="hidden" name="a" value="1"/>
								                		<input type="hidden" name="p" value="${page.pageCount}"/>
								                		<input type="hidden" name="key" value="${key}"/>
								                		<a href="#" type="submit">尾页</a>
							                		</form>
							                	</li>
							                	</c:if>
							                </ul>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div><!-- PAGE CONTENT ENDS -->
					
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script src="<%=path%>/page/back/assets/js/jquery-2.0.3.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script src="<%=path%>/page/back/assets/js/jquery-1.10.2.min.js"></script>
		<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
		</script>
		<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<%=path%>/page/back/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="<%=path%>/page/back/assets/js/bootstrap.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.bootstrap.js"></script>

		<!-- ace scripts -->

		<script src="<%=path%>/page/back/assets/js/ace-elements.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			jQuery(function($) {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table');
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			});
		</script>
		
</body>
</html>